# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroup do
  @moduledoc """
  AppGroup contains the request/response fields representing the logical grouping of apps. Note that appgroup_id, create_time and update_time cannot be changed by the user, and gets updated by the system. The name and the organization once provided cannot be edited subsequently.

  ## Attributes

  *   `appGroupId` (*type:* `String.t`, *default:* `nil`) - Output only. Internal identifier that cannot be edited
  *   `attributes` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t)`, *default:* `nil`) - A list of attributes
  *   `channelId` (*type:* `String.t`, *default:* `nil`) - channel identifier identifies the owner maintaing this grouping.
  *   `channelUri` (*type:* `String.t`, *default:* `nil`) - A reference to the associated storefront/marketplace.
  *   `createdAt` (*type:* `String.t`, *default:* `nil`) - Output only. Created time as milliseconds since epoch.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - app group name displayed in the UI
  *   `lastModifiedAt` (*type:* `String.t`, *default:* `nil`) - Output only. Modified time as milliseconds since epoch.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Name of the AppGroup. Characters you can use in the name are restricted to: A-Z0-9._\\-$ %.
  *   `organization` (*type:* `String.t`, *default:* `nil`) - Immutable. the org the app group is created
  *   `status` (*type:* `String.t`, *default:* `nil`) - Valid values are `active` or `inactive`. Note that the status of the AppGroup should be updated via UpdateAppGroupRequest by setting the action as `active` or `inactive`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appGroupId => String.t() | nil,
          :attributes => list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t()) | nil,
          :channelId => String.t() | nil,
          :channelUri => String.t() | nil,
          :createdAt => String.t() | nil,
          :displayName => String.t() | nil,
          :lastModifiedAt => String.t() | nil,
          :name => String.t() | nil,
          :organization => String.t() | nil,
          :status => String.t() | nil
        }

  field(:appGroupId)
  field(:attributes, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute, type: :list)
  field(:channelId)
  field(:channelUri)
  field(:createdAt)
  field(:displayName)
  field(:lastModifiedAt)
  field(:name)
  field(:organization)
  field(:status)
end

defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroup do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroup.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1AppGroup do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
